package com.engine4cloud.tdf.supervision.convert;

import com.engine4cloud.tdf.supervision.dto.create.TerminalBiologyCreateDTO;
import com.engine4cloud.tdf.supervision.dto.result.TerminalBiologyResultDTO;
import com.engine4cloud.tdf.supervision.dto.update.TerminalBiologyUpdateDTO;
import com.engine4cloud.tdf.supervision.entity.JzdxBiologyFeatureEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface JzdxFeatureConvert {
    JzdxFeatureConvert INSTANCE = Mappers.getMapper(JzdxFeatureConvert.class);

    JzdxBiologyFeatureEntity createOrUpdate(TerminalBiologyCreateDTO s, Long id);

    JzdxBiologyFeatureEntity create(TerminalBiologyCreateDTO s, Long tenantId);

    JzdxBiologyFeatureEntity update(TerminalBiologyUpdateDTO s);

    @Mapping(target = "id", ignore = true)
    JzdxBiologyFeatureEntity updateOrCreate(TerminalBiologyUpdateDTO s, Long tenantId);

    TerminalBiologyResultDTO convert(JzdxBiologyFeatureEntity s);
}
